package com.weita.lightfood.utils;

/**
 * @author IT_Monster at 2019/04/17 15:54.
 * 用于判断是否截止下单
 * 中餐是11:00截止下单，配送时间是11:30—12:00，系统11:30自动发送取货通知，14:00自动确认收货；
 * <p>
 * 晚餐是17:00；17:20—17:55；17:20）
 */
public class CompareTimeUtil {
    private static final String END_TIME_FORENOON = "11:00:00";
    private static final String END_TIME_AFTERNOON = "17:00:00";

    public static boolean isEnd(String time) {
        int result = time.compareTo(END_TIME_FORENOON);
        if (result < 0) {
            return false;
        } else {
            return true;
        }

    }

    public static void main(String[] args) {
        boolean end = CompareTimeUtil.isEnd("10:00:00");
        System.out.println(end);

    }
}
